package icrts.utils;
import java.util.Collection;
import java.util.LinkedList;
import java.util.Arrays;

public class RangeSearchTree<T> {
    /**
     * Number of dimensions for searching.
     */
    public int dimensionCount;
    private MultiDimensionalComparer<T> m_comparer;
//    private SpecificDimensionComparer<T> m_specificDimensionComparer;
    private Node m_root;

    private class Node {
        public Node leftChild, rightChild, nextDimensionRoot;
        public T min, max, value;
    }

    /**
     * Get the dimension count.
     * @return Number of dimensions for searching.
     */
    public int getDimensionCount() { return this.dimensionCount; };
    private void setDimensionCount(int d) { this.dimensionCount = d; };

    public RangeSearchTree(int dimensionCount, Iterable<T> items) {
//        return new RangeSearchTree(dimensionCount, items,
//                MultiDimensionalComparer<T>.getDefault());
    }

    public RangeSearchTree(int dimensionCount, Collection<T> items,
            MultiDimensionalComparer<T> comparer) {
        this.m_comparer     = comparer;
        this.dimensionCount = dimensionCount;
//	this.m_specificDimensionComparer = new SpecificDimensionComparer<T>(m_comparer);
//        this.m_root = buildTree(items, 0);
    }
/*
    private Node buildTree(Collection<T> unsortedItems, int dimension) {
//        m_specificDimensionComparer.dimension = dimension;
	LinkedList<T> items = new LinkedList<T>();
        items.addAll(unsortedItems);
        T[] sortedItems = (T[]) items.toArray();
//        Arrays.sort(sortedItems, m_specificDimensionComparer);
//        return buildSubtree(items, dimension);
    }*/

}
